package com.bc.datasource;

import com.bc.datasource.vo.SendObject;

public class ObjectUtil {

	
	public static String setObject(String s, SendObject so)
			throws Exception {
		String tmp = s.substring(s.indexOf("=\"")+1,s.indexOf("\"|;")).replaceFirst("\"", "").replace("\"|;", "");
		String[] ss = tmp.split("\\^");
		so.setLeagal(ss[2]);
		so.setResult("");
		so.setTeamHome(ss[6].replace("<font color=#880000>(中)</font>", ""));
		so.setTeamVisit(ss[9]);
		String gs = ScanUtils.getGameTime(ss);
		so.setTime(gs);
		so.setId(ss[0]);
		so.setOriginPan(ss[29]);
		so.setLivePointHome(ss[14]);
		so.setLivePointGuest(ss[15]);
		if(!ss[14].equals("0")||!ss[15].equals("0")){
		}
		if(ss[18].length()==0){
			ss[18]= "0";
		}
		if(ss[19].length()==0){
			ss[19]= "0";
		}
		so.setRedch(ss[18]);
		so.setRedcv(ss[19]);
		
		return gs;
	}
}
